package com.example.organization.controller;

import com.example.model.Organization;
import com.example.organization.service.OrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrganizationController {
    @Autowired
    private OrganizationService organizationService;

    @GetMapping("/{id}")
    public Organization getOrganization(@PathVariable int id){
        return organizationService.getOrganizationById(id);
    }
}
